package org.vectrics.recruiter.struts.admin;

import org.apache.log4j.*;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;
import javax.servlet.jsp.JspException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoadXmlSkillsAction extends Action {
    private static Category log = Category.getInstance(LoadXmlSkillsAction.class);


	public ActionForward execute(ActionMapping mapping,
			ActionForm form,
	    	HttpServletRequest request,
			HttpServletResponse response)	throws JspException {
		/*
		log.debug("LoadXmlSkillsAction() called");
		try {
	
			RecruitServiceLocator.getSkillProvider().removeAllSkills();
			SkillConfig.getInstance().reload();
			Iterator iter = SkillConfig.getInstance().getSkillTree().getMasterList().iterator();
			while (iter.hasNext()) {
				log.debug("LoadXmlSkillsAction()- stepping through loaded skills and saving");
				Skill skill = (Skill)iter.next();
				log.debug("LoadXmlSkillsAction()- saving skill = " + skill.getSkillCode());
				RecruitServiceLocator.getSkillProvider().updateSkill(skill);
			}
		}
		catch (SkillException de) {
			log.error("DataException in execute()", de);
			throw new JspException("DataException in execute()", de);
		}
		*/
		return (mapping.findForward("success"));
	}

}
